import request from '@/utils/request'

// 查询地区列表
export function areasList(query) {
  return request({
    url: '/system/areas/list',
    method: 'get',
    params: query
  })
}

// 新增区域
export function addAreas(data) {
  return request({
    url: '/system/areas/add',
    method: 'post',
    data: data
  })
}

// 修改区域
export function editAreas(data) {
    return request({
        url: '/system/areas/edit',
        method: 'put',
        data: data
    })
}

// 根据id查询区域的接口
export function searchAreaById(id) {
    return request({
        url: '/system/areas/'+id,
        method: 'get'
    })
}

// 删除区域
export function deleteAreas(id) {
    return request({
        url: '/system/areas/remove/'+id,
        method: 'delete'
    })
}
